// 导入 axios
import axios from '@/utils/request.js'

// 1.获取搜索建议关键字---------------------------------
export const getSearchSuggestion = (q) => {
  return axios({
    method: 'get',
    url: '/v1_0/suggestion', // suggestion?q=q值
    params: {
      q
    }
  })
}

// 2.获取搜索结果列表---------------------------------
export const getSearch = (keyword, page, pageSize) => {
  return axios({
    method: 'get',
    url: '/v1_0/search', // suggestion?q=q值
    params: {
      page,
      per_page: pageSize,
      q: keyword
    }
  })
}
